// PS#122: Swirling effects. Portal rim, swirl around sword and gauntlents
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.22.949.2248
//
// Parameters:
//
//   sampler2D DepthBuffer;
//   float3 gCameraPos;
//   float gFadeAmount;
//   float4x4 gInvProj;
//   float4 gObjectColor;
//   float gTime;
//   float4 gViewport;
//   float pAlpha_power;
//   sampler2D pDiffuse;
//   float pDiffuseUspeed;
//   float pDiffuseVspeed;
//   float pDistortUVpower;
//   sampler2D pDistortUVtexture;
//   float pDistortUspeed;
//   float pDistortVspeed;
//   float pEmissivePower;
//   float pFresnel_Power;
//   float pFresnel_Strength;
//   float4 pRandom;
//   float pSoftDistance;
//
//
// Registers:
//
//   Name              Reg   Size
//   ----------------- ----- ----
//   gTime             c0       1
//   gCameraPos        c1       1
//   gObjectColor      c2       1
//   gInvProj          c7       4
//   gFadeAmount       c40      1
//   gViewport         c41      1
//   pFresnel_Power    c45      1
//   pFresnel_Strength c46      1
//   pAlpha_power      c47      1
//   pEmissivePower    c48      1
//   pDiffuseUspeed    c49      1
//   pDiffuseVspeed    c50      1
//   pDistortUspeed    c51      1
//   pDistortVspeed    c52      1
//   pDistortUVpower   c53      1
//   pSoftDistance     c54      1
//   pRandom           c55      1
//   pDiffuse          s0       1
//   pDistortUVtexture s1       1
//   DepthBuffer       s2       1
//
//
// Default values:
//
//   pFresnel_Power
//     c45  = { 1, 0, 0, 0 };
//
//   pFresnel_Strength
//     c46  = { 2, 0, 0, 0 };
//
//   pAlpha_power
//     c47  = { 1, 0, 0, 0 };
//
//   pEmissivePower
//     c48  = { 1, 0, 0, 0 };
//
//   pDiffuseUspeed
//     c49  = { 0, 0, 0, 0 };
//
//   pDiffuseVspeed
//     c50  = { 0, 0, 0, 0 };
//
//   pDistortUspeed
//     c51  = { 0, 0, 0, 0 };
//
//   pDistortVspeed
//     c52  = { 0, 0, 0, 0 };
//
//   pDistortUVpower
//     c53  = { 0, 0, 0, 0 };
//
//   pSoftDistance
//     c54  = { 0.01, 0, 0, 0 };
//
//   pRandom
//     c55  = { 0.585009, 0.479873, 0.350291, 0.895962 };
//

    ps_3_0
    def c3, 0.5, -0.5, 0, 1
    dcl_texcoord v0.xyz
    dcl_texcoord1_pp v1.xyz
    dcl_texcoord2 v2.xy
    dcl_texcoord3 v3
    dcl_color_pp v4
    dcl_2d s0
    dcl_2d s1
    dcl_2d s2
    mov r0.x, c0.x
    mad r0.y, r0.x, c51.x, v2.x
    mad r0.z, r0.x, c52.x, v2.y
    add r0.yz, r0, c55.y
    texld_pp r1, r0.yzzw, s1
    mad r0.y, r0.x, c49.x, v2.x
    mad r0.z, r0.x, c50.x, v2.y
    mad r0.xy, r1, c53.x, r0.yzzw
    add r0.xy, r0, c55.x
    texld_pp r0, r0, s0
    mul_pp r0.xyz, r0, v4
    mul_pp r0.xyz, r0, c2
    mul_pp oC0.xyz, r0, c48.x
    add r0.xyz, c1, -v0
    nrm_pp r1.xyz, r0
    nrm_pp r0.xyz, v1
    dp3_pp r0.x, r0, r1
    max_pp r1.x, r0.x, c3.z
    add_pp r0.x, -r1.x, c3.w
    pow_pp r1.x, r0.x, c45.x
    mov_pp r1.w, c3.w
    mad r0.x, c46.x, -r1.x, r1.w
    mul r0.x, r0.x, v4.w
    mul r0.x, r0.w, r0.x
    mul r0.x, r0.x, c47.x
    mul r0.x, r0.x, c2.w
    rcp r0.y, v3.w
    mul_pp r0.yz, r0.y, v3.xxyw
    mul r1.xy, r0.z, c8.zwzw
    mad r1.xy, c7.zwzw, r0.y, r1
    mad_pp r0.yz, r0, c3.xxyw, c3.x
    mad r0.yz, r0, c41.xzww, c41.xxyw
    texld r2, r0.yzzw, s2
    mad r0.yz, c9.xzww, r2.x, r1.xxyw
    add r0.yz, r0, c10.xzww
    rcp r0.z, r0.z
    mad r0.y, r0.y, -r0.z, v3.z
    mul_sat_pp r0.y, r0.y, c54.x
    mul r0.x, r0.x, r0.y
    mul r0.x, r0.x, c2.w
    mul_pp oC0.w, r0.x, c40.x

// approximately 47 instruction slots used (3 texture, 44 arithmetic)
 